import request from '@/utils/request'

// 查询歌曲信息列表
export function listSongs(query) {
  return request({
    url: '/MusicSongs/songs/list',
    method: 'get',
    params: query
  })
}

// 查询歌曲信息详细
export function getSongs(musicSongsId) {
  return request({
    url: '/MusicSongs/songs/' + musicSongsId,
    method: 'get'
  })
}

//添加歌曲信息
export function addSongs(data) {
  return request({
    url: '/MusicSongs/songs',
    method: 'post',
    data: data
  })
}

// 修改歌曲信息
export function updateSongs(data) {
  return request({
    url: '/MusicSongs/songs',
    method: 'put',
    data: data
  })
}

// 删除歌曲信息
export function delSongs(musicSongsId) {
  return request({
    url: '/MusicSongs/songs/' + musicSongsId,
    method: 'delete'
  })
}


// 预览图片
export function getPreview(musicSongsId) {
  return request({
    url: '/musicPage/songpages/' + musicSongsId,
    method: 'post',
  })
}

// 上传图片地址
export function getUpload(data) {
  return request({
    url: '/common/upload',
    method: 'post',
    data: data
  })
}
